-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove persistence of PeerStore to DB #8617
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
saketh-are
requested review from
akhi3030 and
pompon0
and removed request for
akhi3030
February 22, 2023 00:17
pompon0
reviewed
Feb 23, 2023
pompon0
reviewed
Feb 23, 2023
pompon0
approved these changes
Feb 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
mm-near
approved these changes
Feb 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - please also update the CHANGELOG.md
andrei-near
pushed a commit
that referenced
this pull request
Feb 28, 2023
* remove persistence of PeerStore to DB * restore ban_store test * remove dead variable touch_other * delete_peers doesn't error * restore check_ignore_blacklisted_peers test * add high-level comment on PeerStore * deprecate Peers column * finish deprecating Peers column and add DB migration * fix test referencing DBCol::Peers * update CHANGELOG.md
near-bulldozer bot
pushed a commit
that referenced
this pull request
Mar 8, 2023
In #8617 we introduced new DB migration (deprecating Peers column). But before it we had another migration indicating creation of flat storage columns, currently guarded by compilation flag. Actually, we should put "peers" migration **before** "flat state" migration, because for nodes which don't have flat state enabled, intermediate version in `match` will be missing. We didn't see it because we also didn't update `DB_VERSION`, which essentially means that nodes didn't trigger any migrations yet. Here I also bump `DB_VERSION`, so nodes will run "peers" migration and then "flat state" migration if compilation flag is enabled. The only outcome is that our custom nodes which have flat state **will not** run "peers" migration, but this is fine. cc @saketh-are
marcelo-gonzalez
added a commit
to marcelo-gonzalez/nearcore
that referenced
this pull request
Mar 11, 2023
nikurt
pushed a commit
to nikurt/nearcore
that referenced
this pull request
Mar 15, 2023
In near#8617 we introduced new DB migration (deprecating Peers column). But before it we had another migration indicating creation of flat storage columns, currently guarded by compilation flag. Actually, we should put "peers" migration **before** "flat state" migration, because for nodes which don't have flat state enabled, intermediate version in `match` will be missing. We didn't see it because we also didn't update `DB_VERSION`, which essentially means that nodes didn't trigger any migrations yet. Here I also bump `DB_VERSION`, so nodes will run "peers" migration and then "flat state" migration if compilation flag is enabled. The only outcome is that our custom nodes which have flat state **will not** run "peers" migration, but this is fine. cc @saketh-are
nikurt
pushed a commit
to nikurt/nearcore
that referenced
this pull request
Mar 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After the changes in #8579:
Previously, we persisted the PeerStore to disk to support faster network bootstrapping after restarting a node. Now that the ConnectionStore serves that purpose, it is no longer necessary to persist the PeerStore. Unlike ConnectionStore, PeerStore contains unverified information and may contain spam shared by malicious nodes. This PR both removes unnecessary load on the DB and limits persistence of malicious data.
This PR